"use strict";
/**
 * @name log
 * 行为日志
 */

/**
 * @name push
 * @param string data 数据
 * 写入一条行为日志
 */
exports.push = function () {
	let _data = this.get('data', 'string');
	let _do = JSON.parse(_data);
	if (_do) {
		if (typeof (_do) == 'object') {
			if (!_do['uid']) {
				_do['uid'] = this.uid;
			}
			_do['stime'] = (new Date()).valueOf();
			_do['name'] = this.session.get('name');
			let _model = this.model.mongo('plog', this.sid);
			_model.push(_do);
		}
	}
	return;
};  